package com.yourcompany.api.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName("user_oauth")
@Schema(description = "用户第三方授权")
public class UserOauth extends BaseEntity {
    
    @Schema(description = "用户ID")
    private Long userId;
    
    @Schema(description = "授权类型：weixin/qq/alipay")
    private String oauthType;
    
    @Schema(description = "第三方用户ID")
    private String oauthId;
    
    @Schema(description = "第三方开放平台ID")
    private String unionId;
    
    @Schema(description = "授权凭证")
    private String credential;
    
    @Schema(description = "凭证有效期")
    private Integer expiresIn;
    
    @Schema(description = "授权范围")
    private String scope;
    
    @Schema(description = "刷新token")
    private String refreshToken;
    
    @Schema(description = "刷新token有效期")
    private Integer refreshExpiresIn;
    
    @Schema(description = "状态：0-无效 1-有效")
    private Boolean status;
    
    @Schema(description = "创建人ID")
    private Long creatorId;
    
    @Schema(description = "修改人ID")
    private Long modifierId;
} 